home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / DllSys_Files / GLOBAL.H < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-08  |  1.3 KB  |  71 lines

  1. // Author: Wesley Curtis Lefebvre
  2.  
  3. #ifndef __GLOBAL_H__
  4. #define __GLOBAL_H__
  5.  
  6. #include <stdio.h>
  7. #include <float.h>
  8. #include <string.h>
  9. #include <malloc.h>
  10. #include <stdlib.h>
  11. #include <time.h>
  12. #include <math.h>
  13.  
  14. #define nil            NULL
  15. #define YES            1
  16. #define NO            0
  17. #define MAX(x,y)    x>y?x:y;
  18. #define PI             3.1415927
  19. #define NSInt        int
  20. #define NSUInt        UINT
  21. #define NSLong        long
  22. #define NSFloat        float
  23.  
  24. #define DLL_PARAM_ROWS    5
  25. #define DLL_PARAM_COLS    3
  26.  
  27. #ifndef FALSE
  28. #define FALSE        0
  29. #endif
  30. #ifndef TRUE
  31. #define TRUE        1
  32. #endif
  33. #ifndef NULL
  34. #define NULL        0
  35. #endif
  36.  
  37. typedef int            BOOL;
  38.  
  39. typedef struct {
  40.     NSFloat *data;
  41.     int length;
  42. } DLLWeights;
  43.  
  44. typedef struct {
  45.     char parameters[DLL_PARAM_ROWS][DLL_PARAM_COLS][64];
  46.     char parameterNames[DLL_PARAM_ROWS][DLL_PARAM_COLS][64];
  47.     BOOL parameterReallocs[DLL_PARAM_ROWS][DLL_PARAM_COLS];
  48. } DLLParameters;
  49.  
  50. typedef struct {
  51.     DLLWeights *weights;
  52.     DLLParameters *parameters;
  53.     void *userData;
  54. } DLLData;
  55.  
  56. typedef struct { 
  57.     void    *function, 
  58.             *constructor, 
  59.             *destructor;
  60.     DLLData    *instance; 
  61. } DLLStruct;
  62.  
  63. typedef DLLData     *(*DLL_Constructor)(DLLData *);
  64. typedef void        (*DLL_Destructor)(DLLData *);
  65.  
  66. FILE *seekComponent(FILE *, const char *, unsigned int);
  67. FILE *putComponent(FILE *, const char *, unsigned int);
  68. //int max(int, int);
  69.  
  70. #endif // __GLOBAL_H__
  71.